program Project2;

{$APPTYPE CONSOLE}

uses
  SysUtils;

type
  pelement=^element;
  element=record
    next: pelement;
    value: integer;
  end;
procedure Add(var head: pelement; num: integer);
var
  tmp: pelement;
begin
  tmp:=head;
  new(head);
  head^.next:=tmp;
  head^.value:=num;
end;

procedure print(var head: pelement);
var
  current: pelement;
begin
  current:= head;
  while(current<> nil) do
  begin
    writeln(current^.value);
    current:=current^.next;
  end;
end;

procedure DelEv(var head: pelement; n: integer);
var
tmp, current: pelement;
k, i: integer;
begin
  current:=head;
  for i:=1 to n-1 do
  begin
    k:=current^.next^.value;
    if (k mod  2 = 0) then
    begin
      tmp:=current^.next^.next;
      dispose(current^.next);
      current^.next:=tmp;
    end;
    if (k mod 2 <> 0) then
      current:=current^.next;
  end;
  k:=head^.value;
  if (k mod 2 = 0) then
  begin
    tmp:=head^.next;
    dispose(head);
    head:=tmp;
  end;
end;
procedure PlusK(var head: pelement; n: Integer);
var
  current: pelement;
  i: Integer;
begin
  current:=head;
  i:=1;
  while (current<>nil) do
  begin
    current^.value:=current^.value+i;
    i:=i+1;
    current:=current^.next;
  end;
end;
var
  fin: textfile;
  n, i, num: integer;
  head: pelement;
begin
  assignfile(fin, 'input.txt');
  reset(fin);
  readln(fin, n);
  for i:=1 to n do
  begin
    read(fin, num);
    Add(head, num);
  end;
  delEv(head, n);
  PlusK(head, n);
  print(head);
  readln;
end.
